package com.weipai.springboot.module.service;

import com.weipai.springboot.model.Goods;
import com.weipai.springboot.model.Product;
import com.weipai.springboot.model.ProductDesc;
import com.weipai.springboot.model.api.Response;

/**
 * @Author: 曹朋飞
 * @Date: 2018/08/22 15:21
 * <p>
 * 货品
 */
public interface GoodsService {

    //新增商品
    Response save(Product product, ProductDesc productDesc, String goodsInfo, String productPro);

    //删除产品
    Response deleteByGoodsById(String id);

    //更改商品的状态
    Response changeGoodsStatus(String id, Integer status);

    //根据product的id查询详情
    Response getProductInfoById01(String id);

    //根据product的id查询详情
    Response getProductInfoById02(String id, String categoryId, String spuNumber);

    //搜索商品
    Response searchGoodsByCategoryId(String categoryId, int page, int size, String draw);


    Goods selectByGoodsId(String goodsId);


    //精品列表
    Response searchBoutiqueGoods(String shopId, String categoryId, Integer size);

    //人气精选商品
    Response searchPopularBountiqueGoods(String shopId, Integer size);

    //店铺内部-人气精选商品
    public Response searchPopularGoodsByShop(String shopId, Integer page, Integer size);

    //大牌精选商品
    Response searchBigBrandBountiqueGoods(Integer size);

    //当前浏览商品的相关商品列表
    Response searchRelatedGoods(String goodsId, Integer size);

    //在一级工具下的相关推荐商品列表
    Response searchRecommendGoods(String categoryId, Integer size);

    //限时抢购列表
    Response searchSpecialGoods(int page, int size, String draw);

    //新品列表
    Response searchNewGoods(Integer size);
    
    //更新货品
    Response updateProduct(String productId, String productSpec, String productName, ProductDesc productDesc,
                           Integer consumeIntegral, Integer commentIntegral,
                           Integer isBoutique, Integer isNews, Integer isPackage);

    //新增商品
    Response saveGoods(String spuNumber, String goodsInfo);

    //修改商品
    Response updateGoods(String goodsId, String goodsInfo);

    //通过shopid  搜索 商品数量
    int countByShop(String shopId);

    //前端商城展示商品详情
    Response getProductInfoBySpuNumber(String spuNumber,String customerId);

    //保存商品到索引库
    Response saveGoodsIndex(String id);

    //删除商品索引
    Response deleteGoodsIndex(String id);

    //关键字搜索
    Response searchGoodsByKeyWord(String keyword,
                                  Integer isNews,
                                  Integer isBoutique,
                                  Integer isBigBrand,
                                  String path,
                                  String brandName,
                                  Integer minPrice,
                                  Integer maxPrice,
                                  String[] prop,
                                  Integer page,
                                  Integer size,
                                  String shopId,
                                  String sort,
                                  String way,
                                  String clientType,Integer isHomePage);

    //产品审核
    Response changeIsAudit(String id, Integer status);

    Response saveGoodsIndex();

    Response deleteGoodsIndex();

    Response searchGoodsByKeyWord22(Integer page, Integer size, String sort, String way);

    //更改产品的状态
    Response changeProductStatus(String spuNumber, Integer status);

    //删除产品
    Response deleteProductBySpuNumber(String spuNumber);

    //通过商品的id获取商品详情
    Response getGoodsInfoByGoodsId(String goodsId);

    //检索商品
    Response searchGoods(String search, Integer page, Integer size);

    //秒杀商品和和会场商品--前端商品详情
    Response getSpecialGoodsInfo(String id);

    Response updataProductToGoods();

    //通过商品编码查询商品
    Response getGoodsBySkuNumber(String skuNumber, String customerId);

    Response searchBySoldOutGoods();


    void updateSoldOutGoods();
}
